//
//  ZHMyAddressCell.m
//  LoveFreshBee
//
//  Created by brice Mac on 2016/10/19.
//  Copyright © 2016年 王忠迪. All rights reserved.

#import "ZHMyAddressCell.h"
#import "ZHMyAddressData.h"

@interface ZHMyAddressCell ()
//名字label
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
//电话label
@property (weak, nonatomic) IBOutlet UILabel *phoneNumLabel;
//地址label
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
//编辑按钮
@property (weak, nonatomic) IBOutlet UIButton *editAddrButton;

@end

@implementation ZHMyAddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.separatorInset = UIEdgeInsetsMake(0, -100, 0, -100);
    
}

- (void)setModel:(ZHMyAddressData *)model {
    
    _model = model;
    self.editAddrButton.tag = model.index;
    self.nameLabel.text = model.accept_name;
    self.phoneNumLabel.text = model.telphone;
    self.addressLabel.text = model.address;
}

- (IBAction)editButtonClick:(UIButton *)sender {
    
    if ([self.delegate respondsToSelector:@selector(editButtonClick:)]) {
        [self.delegate editButtonClick:sender];
    }
}


@end
